package com.tanhua.server.controller;

/**
 * @Author: cl
 * @Date: 2022/5/7 - 05 - 07
 * @Description:
 */

import com.tanhua.model.vo.HuanXinUserVo;
import com.tanhua.server.service.HuanXinService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 环信即时通讯模块
 */
@RestController
@RequestMapping("/huanxin")
public class HuanXinController {

    @Autowired
    private HuanXinService huanXinService;

    /**
     * 用户登录后获取环信账户密码
     *
     * @return
     */
    @GetMapping("/user")
    public ResponseEntity user() {

        HuanXinUserVo vo = huanXinService.getHuanXinUser();
        return ResponseEntity.ok(vo);
    }
}
